#include<stdio.h>
#include<stdlib.h>

#define eleType int


typedef struct {
    eleType *elements;
    size_t front;
    size_t rear;
    size_t capacity;
} Queue;


void QueueCreate(Queue *q){
    q -> elements = (eleType *)malloc(sizeof(eleType) * 8);
    q-> front = 0;
    q-> rear = 0;
    q-> capacity = 8;
}

void QueueDestroy(Queue *q){
    free(q -> elements);

    q -> front = 0;
    q -> rear = 0;
    q -> capacity = 0;
    q -> elements = NULL;
}

void QueueResize(Queue *q){
    eleType *newElements = (eleType *)realloc(q->elements, sizeof(eleType) * (q->capacity * 2));

    if(newElements == NULL){
        exit(1);
    }
    q -> elements = newElements;
    q -> capacity *= 2;
}

void QueuePush(Queue *q, eleType e){
    
}